#include "helpui.h"
#include "ui_helpui.h"
#include <QPainter>
HelpUI::HelpUI(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::HelpUI)
{
    ui->setupUi(this);
    setAttribute(Qt::WA_DeleteOnClose);//调用close时就调用析构，释放空间
    //    设置固定大小
    setFixedSize(470,720);
    setWindowTitle("CTYYPE");
    //    设置图标
    setWindowIcon(QIcon(":/image/enemy1.png"));
    ui->textEdit->setStyleSheet("QTextEdit {background-color:#595959; border:3px solid #FBF8F3;}");
    pushBTN =new usualButton(this);
    pushBTN->setText("确认");
    pushBTN->move(175,570);
    connect(pushBTN,&usualButton::clicked,[=](){
        this->close();
    });
}


void HelpUI::paintEvent(QPaintEvent *event)
{
    QPainter resPainter(this);
    resPainter.drawPixmap(0,0,this->width(),this->height(),QPixmap(":/image/helpbg.jpg"));
}


HelpUI::~HelpUI()
{
    delete pushBTN;
    delete ui;
}
